//
//  XCVisitorView.m
//  weibo-OC
//
//  Created by 1 on 16/3/6.
//  Copyright © 2016年 1. All rights reserved.
//

#import "XCVisitorView.h"
#import <Masonry.h>

@interface XCVisitorView ()

@property (nonatomic,strong) UIImageView *circle;
@property (nonatomic,strong) UIImageView *home;
@property (nonatomic,strong) UILabel *tipLabel;


@end

@implementation XCVisitorView

//懒加载
- (UIImageView *)circle{
    
    if(!_circle){
        
        _circle = [[UIImageView alloc]init];
        
        _circle.image = [UIImage imageNamed:@"visitordiscover_feed_image_smallicon"];
    }
    
    return _circle;
}

- (UIImageView *)home{
    
    if(!_home){
        
        _home = [[UIImageView alloc]init];
        
        _home.image = [UIImage imageNamed:@"visitordiscover_feed_image_house"];
    }
    
    return _home;
}

- (UILabel *)tipLabel{

    if(!_tipLabel){
        
        _tipLabel = [[UILabel alloc]init];
        
        _tipLabel.text = @"添加点好友，再过来看看";
        _tipLabel.textColor = [UIColor grayColor];
        
    }
    
    return _tipLabel;
}

- (instancetype)init{
    
    if(self = [super init]){
        
        self.backgroundColor = [UIColor whiteColor];
        
        [self addSubview:self.circle];
        [self addSubview:self.home];
        [self addSubview: self.tipLabel];
        
    }
    
    return self;
}


- (void)layoutSubviews{
    
    [super layoutSubviews];
    
    [self.circle mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.centerX.equalTo(self.mas_centerX);
        make.centerY.equalTo(self.mas_centerY);
    }];
    
    [self.home mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.centerX.equalTo(self.mas_centerX);
        make.centerY.equalTo(self.mas_centerY);
        
//        make.center.equalTo(self).centerOffset(CGPointZero);
    }];
    
    [self.tipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
       

        make.top.equalTo(self.circle.mas_bottom).offset(10);
        
        make.centerX.equalTo(self.mas_centerX);
    }];
}


@end
